package cn.stronglink.assetmanage.business.setting.synctype;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.stronglink.assetmanage.R;
import cn.stronglink.assetmanage.business.setting.synccontent.SyncListener;

/**
 * @author zww
 * 2018 2018/6/18 14:44
 */
public class SystemSyncTypeHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    @BindView(R.id.txtSyncTypeContent)
    TextView txtSyncTypeContent;
    @BindView(R.id.imgSyncTypeCheck)
    ImageView imgSyncTypeCheck;
    private SyncListener listener;

    SystemSyncTypeHolder(View view, SyncListener listener) {
        super(view);
        this.listener = listener;
        ButterKnife.bind(this, view);
        view.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        if (null != listener) {
            listener.onSynItemClick(view, getAdapterPosition());
        }
    }
}
